#include <iostream>
using namespace std;

int main()
{
    float a;
    char b;
    cin >> a >> b;
    cout << 20 + ((a == (int)a)? a - 1: (int)a) + ((b == 'y') ? 5 : 0);
    return 0;
}